#ifndef TIMINGSETTINGS_H
#define TIMINGSETTINGS_H

#include <QDialog>
#include <QtSql>
#include <QTableView>

namespace Ui {
    class TimingSettings;
}

class TimingSettings : public QDialog
{
    Q_OBJECT

public:
    explicit TimingSettings(QWidget *parent = 0);
    ~TimingSettings();
    void AllowClearTimeChange();
    int originalPurgeTime;
    QSqlDatabase timingDatabase;
    QTimer *ReportTimer;

private:
    Ui::TimingSettings *ui;
    void CreateNewTable();
    void LoadExistingValues();
    long t;


signals:
    void SendPositionReport();
    void updateClearTime(int);

private slots:
    void CheckClearTime();
    void ChangePurgeTime();
    void ChangeReportingTime();
    void HidePurgeTimeInputs();
    void HideClearTimeInputs();
    void SaveIsClicked();
    void ViewDatabase();
    void ReportUpdate();

};

#endif // TIMINGSETTINGS_H
